


import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:little_game/redux/GlobalStore.dart';
import 'package:little_game/redux/action.dart';

class Load extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _LoadState();
  }


}

class _LoadState extends State<Load> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Stack(
            children: <Widget>[
              Container(
                width: double.infinity,
                height: double.infinity,
                child: Image.asset("images/y.jpg",fit: BoxFit.fill,),
              ),
              Positioned(
                top: 10.0,
                right: 15.0,
                child: Container(
                  child: StoreBuilder<GlobalStore>(
                    builder: (ctx,s){
                      return InkWell(

                        child: Container(
                          color: Colors.white.withOpacity(0.2),
                          padding: EdgeInsets.symmetric(horizontal: 8.0,vertical: 2.0),
                          child: Text("跳过",style: TextStyle(color: Colors.white,fontSize: 12.0),),
                        ),
                        onTap: (){
                          s.dispatch(InitRefreshAction(true));
                        },
                      );
                    },
                  ),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }

}